<?php
include ('connexion_base.php');
$id_connexion = connexion();
if ($id_connexion->connect_errno==0)
{
$login = $_POST['login'];
$mdp = $_POST['mdp'];
$requete = 'select * from utilisateur where pseudo="'.$login.'" and passe="'.$mdp.'"';
$resultat = $id_connexion->query($requete);
$nbre = $resultat->num_rows;
if ($nbre==1)
{ //Création d'une variable de session
$_SESSION['validuser'] = $_POST['login'];
}
}
?>